<ion-view view-title="手机通讯录" show-tabs>
    <form ng-submit="getList();">
        <ion-header-bar class="bar-light bar-subheader item-input-inset">
            <div class="item-input-wrapper light-bg" ng-class="focused">
                <i class="icon ion-ios-search-strong placeholder-icon"></i>
                <input type="search" id="searchInput" placeholder="搜索联系人" ng-model="filter" ng-change="setFilter();">
            </div>
            <i class="ion ion-ios-close dark2" ng-show="filter.length" ng-click="resetFilter();"></i>
        </ion-header-bar>
    </form>

  <ion-content>

  	<div class="list">
  		<ion-checkbox collection-repeat="contact in contacts | filter:filter" ng-checked="selectedItems.indexOf(contact) > -1" ng-click="select(contact);">
        <div class="row row-nopadding">
  				<div class="col">{{contact.name}}</div>
  				<div class="col">{{contact.phones[0].value || contact.phones[1].value}}</div>
  			</div>
  		</ion-checkbox>
  	</div>

  </ion-content>
  <div class="bar bar-footer has-footer bar-balanced" ng-if="selectedItems.length>0">
    <a class="title" ng-click="import();" href="#/suppliers">
      导入 {{selectedItems.length}} 个联系人
    </a>
  </div>
</ion-view>
